package chap5.Task;
public class Task2 {
    public static void main(String[] args) {
        int[] a = new int[31];
        int j = 1;
        for (int i = 0; i < a.length; i++) {
            a[i] = j;
            j = j * 2;
        }
        System.out.println("倒序输出数组每个元素的值:");
        for (int i = 0; i < a.length; i++) {
            System.out.print(a[i] + "  ");
            if ((i + 1) % 10 == 0)
                System.out.println();
        }
    }
}
